package com.gxgeek.springbootquartz.quartz;

import lombok.Data;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author gaoxing
 * @create 2017-12-11 下午5:01
 */
@Data
public class HelloJob implements Job {

    private String message;
    private Float floatValue;
    private Double doubleValue;


    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        //打印当前执行的时间
        Date date = new Date();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        System.out.println("Current Exec Time is:" + simpleDateFormat.format(date));

    }
}
